package com.ym.medical.enums;

import com.alibaba.fastjson.JSONObject;
import com.fasterxml.jackson.databind.util.StdConverter;
import com.ym.common.annotations.EnumDescription;
import com.ym.common.constant.DictEnum;

/**
 * his医生学历
 */
@EnumDescription("his医生学历")
public enum DoctorNavInforEduEnum implements DictEnum {

    //--------------------start-----------------

    /**
     * 中专
     */
    TECHNICAL_SECONDARY_SCHOOL("01","中专"),
    /**
     * 专科
     */
    SPECIALIZED_SUBJECT("02","专科"),
    /**
     * 高中
     */
    HIGH_SCHOOL("03","高中"),
    /**
     * 本科
     */
    UNDERGRADUATE_COURSE("04","本科"),
    /**
     * 硕士
     */
    A_MASTERS_DEGREE("05","硕士"),
    /**
     * 博士
     */
    DR("06","博士"),
    /**
     * 其他
     */
    OTHER("07","其他"),

    //--------------------end-------------------
    ;

    private String key;

    private String value;

    DoctorNavInforEduEnum(String key, String value) {
        this.key = key;
        this.value = value;
    }

    @Override
    public String getKey() {
        return this.key;
    }

    @Override
    public String getValue() {
        return this.value;
    }


    /**
     * 序列化使用
     */
    public static class Covert extends StdConverter<String, JSONObject> {
        @Override
        public JSONObject convert(String value) {
            return DictEnum.valueOfJson(DoctorNavInforEduEnum.class, value);
        }
    }
}
